CC = gcc
CFLAGS = -Wall -g
LDFLAGS = -lm
SRCS = $(wildcard *.c)
OBJS = $(patsubst %.c,%.o,$(SRCS))

run:$(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
	@echo $(OBJS)

%.o:%.c
	$(CC) $(CFLAGS) -o $@ -c $<

.PHONY:
clean:
	rm -f *.o run core.*



